<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LXQ直播间</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="js/jquery.barrager.js"></script>
    <link rel="stylesheet" href="css/barrager.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/stomp.js/2.3.3/stomp.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/sockjs-client/1.5.1/sockjs.js"></script>
    <style>
        .sceen {
            width: 1200px;
            height: 500px;
            background-color: #444;
            margin: 50px auto 0 auto;
            position: relative;
        }
    </style>
</head>
<body>
<div class="sceen" id="sceen"></div>
<div>
    <input type="text" id="msg">
    <button id="send">发送</button>
</div>
<script>
    $(function () {
        var item = {
            img: 'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=932225914,4019385925&fm=26&gp=0.jpg', //图片
            info: '请填写弹幕文字', //文字
            href: '', //链接
            close: false, //显示关闭按钮
            speed: 10, //延迟,单位秒,默认6
            color: '#ffffff', //颜色,默认白色
            old_ie_color: '#ffffff', //ie低版兼容色,不能与网页背景相同,默认黑色
        }
        var socket = new SockJS("http://localhost:8080/stomp");
        stompClient = Stomp.over(socket);
        stompClient.connect({}, function (frame) {
            console.log(frame)
            stompClient.subscribe('/topic/businessUserId/162', function (frame2) {
                console.info(frame2);
            });
        })
    })
</script>
</body>
</html>